package com.chuyu.jzwboa.adapter.main;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

/**
 * @description mainactivity  中 noscrollviewpager 的adapter
 * Created by wo on 2017/10/16.
 */

public class TabAdapter<T> extends FragmentPagerAdapter {
    private Fragment[] list;

    public TabAdapter(FragmentManager fm, Fragment[] fragmented) {
        super(fm);
        this.list = fragmented;
    }

    @Override
    public Fragment getItem(int arg0) {
        return (Fragment) list[arg0];
    }

    @Override
    public int getCount() {
        return list.length;
    }
}
